<div class="didget">
<h2>Recent Posts</h2>
<div id="maga"></div>
<div class="widget2">
<ul>

  <?php $recent = new WP_Query("showposts=10"); while($recent->have_posts()) : $recent->the_post();?>
  
    <?php $values = get_post_custom_values("post-img"); if (isset($values[0])) : ?>

<?php $timthumb_activate = get_theme_option('timthumb_activate'); if($timthumb_activate == 'Yes') { ?>

<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img class="epic" src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php $values = get_post_custom_values("post-img"); echo $values[0]; ?>&amp;w=<?php $thumbwidth = get_theme_option('thumb_width');  if($thumbwidth == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbwidth); ?><?php } ?>&amp;h=<?php $thumbheight = get_theme_option('thumb_height');  if($thumbheight == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbheight); ?><?php } ?>&amp;zc=1&amp;q=100&amp;cropfrom=<?php $thumbcrop = get_theme_option('timthumb_cropping');  if($thumbcrop == '') { ?>topcenter<?php } else { ?><?php echo stripcslashes($thumbcrop); ?><?php } ?>" alt="<?php the_title(); ?>" /><span><?php the_title(); ?></span></a>

</li>
<?php } else { ?>

<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img class="epic" src="<?php $values = get_post_custom_values("post-img"); echo $values[0]; ?>" alt="<?php the_title(); ?>" width="<?php $thumbwidth = get_theme_option('thumb_width');  if($thumbwidth == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbwidth); ?><?php } ?>" height="<?php $thumbheight = get_theme_option('thumb_height');  if($thumbheight == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbheight); ?><?php } ?>" /><span><?php the_title(); ?></span></a>
</li>
<?php } ?>

<?php else: ?>

<?php $timthumb_activate = get_theme_option('timthumb_activate'); if($timthumb_activate == 'Yes') { ?>

<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img class="epic" src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_post_image(); ?>&amp;w=<?php $thumbwidth = get_theme_option('thumb_width');  if($thumbwidth == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbwidth); ?><?php } ?>&amp;h=<?php $thumbheight = get_theme_option('thumb_height');  if($thumbheight == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbheight); ?><?php } ?>&amp;zc=1&amp;q=100&amp;cropfrom=<?php $thumbcrop = get_theme_option('timthumb_cropping');  if($thumbcrop == '') { ?>topcenter<?php } else { ?><?php echo stripcslashes($thumbcrop); ?><?php } ?>" alt="<?php the_title(); ?>" /><span><?php the_title(); ?></span></a>
</li>
<?php } else { ?>

<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img class="epic" src="<?php echo get_post_image(); ?>" alt="<?php the_title(); ?>" width="<?php $thumbwidth = get_theme_option('thumb_width');  if($thumbwidth == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbwidth); ?><?php } ?>" height="<?php $thumbheight = get_theme_option('thumb_height');  if($thumbheight == '') { ?>60<?php } else { ?><?php echo stripcslashes($thumbheight); ?><?php } ?>" /><span><?php the_title(); ?></span></a>
</li>
<?php } ?>

<?php endif; ?>
            
  <?php endwhile; ?>

</ul>


            </div>

</div>


